package com.redoor.app.stake.basicdata.service;

import com.redoor.app.stake.basicdata.model.BaseStake;
import com.redoor.app.stake.basicdata.model.BussinessTypeEnum;
import com.redoor.app.stake.basicdata.model.controllerModel.BaseStakeCriteria;
import com.redoor.app.stake.basicdata.model.controllerModel.BaseStakeModifyBean;
import com.redoor.app.stake.basicdata.model.serviceModel.BaseStakeServiceBean;
import com.yotouch.app.stake.model.*;

import java.util.List;
import java.util.Map;

/**
 * Created by wangjunlei on 2018-02-12 10:08:10.
 */
public interface BaseStakeService {
    /**
     * 分页查询桩集合
     * @param criteria
     * @return
     */
    public List<BaseStake> queryStake(BaseStakeCriteria criteria);

    /**
     * 查询充电桩列表数量
     * @param params
     * @return
     */
    int queryStakeCount(BaseStakeCriteria params);

    /**
     *
     * @param uuid
     */
    int deleteStake(String uuid,BussinessTypeEnum.TRACE_TYPE typeEnum, String operatoruuid);

    /**
     *
     * @param uuid
     * @return
     */
    BaseStake findStakeById(String uuid);

    /**
     *
     * @param info
     */
    String saveStake(BaseStake info,BussinessTypeEnum.TRACE_TYPE typeEnum, String operatoruuid);

    /**
     *
     * @param info
     * @return
     */
    int updateStakeBySelective(BaseStake info,BussinessTypeEnum.TRACE_TYPE sourcetype, String operatoruuid);

    /**
     * 修改桩信息
     * @param modifyBean 桩实体
     * @param typeEnum 操作类型枚举
     * @return
     */
    int updateStakeModify(BaseStakeModifyBean modifyBean,BussinessTypeEnum.TRACE_TYPE typeEnum, String operatoruuid);

    public BaseStake getBaseStakeByParams(BaseStakeCriteria criteria);

    /**
     * 根据桩编号查询桩
     * @param stakeNo
     * @return
     */
    public BaseStake getBaseStakeByStakeNo(String stakeNo);

    /**
     * 根据注册码主键查询桩
     * @param reguuid
     * @return
     */
    public BaseStake getBaseStakeByRegistration(String reguuid);

    /**
     * 根据注册码主键查询桩授权码
     * @param reguuid
     * @return
     */
    public String getAuthCodeByRegUuid(String reguuid);

    public String getStakeNoByOrgCode(String orgCode);

    public BaseStake getStakeByStakeNo(String stakeNo);


    /**********************HSF接口**************************/


    List<Stake> queryStakeHSF(BaseStakeCriteria criteria);

    Stake getStakeHSF(BaseStakeCriteria criteria);

    /**
     * 根据桩编号查找桩
     * @param stakeNo
     * @return
     */
    Stake getStakeHSF(String stakeNo);

    int queryStakeCountHSF(BaseStakeCriteria criteria);

    /**
     *
     * @return
     */
    List<BaseStakeServiceBean> listServiceStake(BaseStakeCriteria criteria);
    /**
     * HSF接口(大屏调用)
     * 统计国网/三方桩数据
     * @Author zhangYiHang
     * @Date 2018/3/28 9:21
     * @Param
     */
    GlobalMonitor qryStakeGlobalMonitorToHSF(Map<String, Object> map);
    /**
     * HSF接口(大屏调用)
     * 统计桩数据
     * @Author zhangYiHang
     * @Date 2018/3/28 11:28
     * @Param
     */
    RegionStatistic qryStakeRegionStatisticToHSF(Map<String, Object> map);
    /**
     * HSF 桩数量查询
     * @Author zhangYiHang
     * @Date 2018/3/28 17:45
     * @Param
     */
    SocialPile qryBaseStakeCount(Map<String, Object> map);

    /**
     * HSF接口 调用
     * 社会充电桩排名 （排名前8个）
     * @Author zhangYiHang
     * @Date 2018/3/28 19:30
     * @Param
     */
    List<EChartsData> qryEChartsData(Map<String, Object> map);
    /**
     * HSF 调用
     * 此方法原代码中未被调用,返回结果为stake集合
     * @Author zhangYiHang
     * @Date 2018/3/29 10:24
     * @Param
     */
    List<BaseStake> qryBaseStakeList(Map<String, Object> map);
    /**
     * @Author zhangYiHang
     * @Date 2018/4/10 19:47
     * @Param
     */
    BaseStake selectOne(BaseStake baseStake);
    /**
     * 充电桩详情查询
     * @Author zhangYiHang
     * @Date 2018/4/14 20:03
     * @Param
     */
    BaseStakeServiceBean stakeDetail(String id);
    /**
     * 根据设备型号主键查询绑定桩数量
     * @Author zhangYiHang
     * @Date 2018/4/19 10:35
     * @Param
     */
    int qryStakeCountByEquipmentUuid(String equipmentUuid);
}
